<?php
$this->breadcrumbs=array(
	tt('Menu'),
);

$this->h1 = tt('Menu');
?>

<?php
echo CHtml::htmlButton(
		tt('Create Menu'), 
		array(
			'class'=>'button grey', 
			'onclick'=>'document.location.href="'.Yii::app()->createAbsoluteUrl(
					"/menu/admin/default/create").'"'
			)
);

$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'news-grid',
	'cssFile'=>Yii::app()->theme->baseUrl.'/css/tables.css',
	'itemsCssClass'=>'item-class',
	'pagerCssClass'=>'pager-class',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'name' => 'id',
			'htmlOptions' => array('class'=>'grid-status-column'),
			'sortable' => false,
		),
		
		array(
			'name' => 'label',
			'sortable' => false,
		),
		
		array(
			'name' => 'title',
			'sortable' => false,
		),
		
		array(
			'class'=>'CButtonColumn',
			'template'=>'{update}{view}{delete}',
			'deleteConfirmation' => tt('Are you sure you want to delete this menu?'),
			'htmlOptions' => array('class'=>'button-column'),
			'buttons' => array(
				'update' => array(
					'imageUrl' => $url = Yii::app()->theme->baseUrl.'/images/icon_edit.png',
				),
				'view' => array(
					'imageUrl' => $url = Yii::app()->theme->baseUrl.'/images/icon_view.png',
				),
				'delete' => array(
					'imageUrl' => $url = Yii::app()->theme->baseUrl.'/images/icon_delete.png',
				),
			),
		),
	),
));
?>
